﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;

namespace MT.ControlLibrary.Controls
{
    public class TreeViewItemWithImage:RadioButton
    {
        /// <summary>
        /// Icon 按钮的Content，使用IconFont的形式
        /// </summary>
        public static readonly DependencyProperty IconProperty = DependencyProperty.Register("Icon", typeof(string), typeof(TreeViewItemWithImage), new PropertyMetadata(string.Empty));
        public string Icon
        {
            get { return (string)GetValue(IconProperty); }
            set { SetValue(IconProperty, value); }
        }

        /// <summary>
        /// Icon 按钮的Content，使用IconFont的形式
        /// </summary>
        public static readonly DependencyProperty IconVisibilityProperty = DependencyProperty.Register("IconVisibility", typeof(Visibility), typeof(TreeViewItemWithImage), new PropertyMetadata(Visibility.Visible));
        public Visibility IconVisibility
        {
            get { return (Visibility)GetValue(IconVisibilityProperty); }
            set { SetValue(IconVisibilityProperty, value); }
        }

        static TreeViewItemWithImage()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(TreeViewItemWithImage), new FrameworkPropertyMetadata(typeof(TreeViewItemWithImage)));
        }

        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
        }
    }
}
